﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RoadTeam.Enums;
using System.Reflection;
using System.Data;


namespace RoadTeam.SysInterface
{

    public static partial class FactoryClass
    {
        private static RoadTeam.SysInterface.IRmUnit _iRmUnit;

        public static IRmUnit CreateRmUnit()
        {
            if (_iRmUnit == null)
            {
                string className = GlobalConfig.RtSystemPath + ".RM.RmUnit_Sys";
                _iRmUnit = (IRmUnit)Assembly.Load(GlobalConfig.RtSystemPath).CreateInstance(className);
            }
            return _iRmUnit;
        }
    }

    public interface IRmUnit
    {
        String GetUnitID(String UnitIdentifier);
         bool UpdateUnitTable(DataTable dt);
        DataTable GetUnitTable(String OrganID);
        DataTable GetUnitTable();
        int GetUnitDataAllPageCount(String OrganID);
        DataTable GetUnitDataByPage(String OrganID, int PageSize, int CurrentPage, int AllCount);
        DataTable GetUnitData(String Where);
    }
}
